import React, { Component } from 'react';
import { Route, Switch, Link } from 'react-router-dom';
import Home from './Home';
import About from './About';
import Public from './Public';
import PublicOne from './PublicOne';
import PublicId from './PublicId';
import Errora from './404';
class App extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    render() {
        return (
            <>
                <Link to="/">首页</Link> | <Link to="/about">About</Link> | <Link to="/public/">公众页面</Link> | <Link to="/public/one">公众One</Link>
                <Switch>
                    <Route path="/" exact component={Home} />
                    <Route path="/about" component={About} />
                    <Route path="/public/" strict exact component={Public} />
                    <Route path="/public/one" component={PublicOne} />
                    <Route path="/public/:id" strict exact component={PublicId} />
                    <Route component={Errora} />
                </Switch>
            </>
        );
    }
}

export default App;